home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libxml.idb / usr / freeware / include / gnome-xml / valid.h.z / valid.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.8 KB  |  89 lines

  1. /*
  2.  * valid.h : interface to the DTD handling and the validity checking
  3.  *
  4.  * See Copyright for the status of this software.
  5.  *
  6.  * Daniel.Veillard@w3.org
  7.  */
  8.  
  9.  
  10. #ifndef __XML_VALID_H__
  11. #define __XML_VALID_H__
  12. #include "tree.h"
  13.  
  14. /*
  15.  * ALl notation declarations are stored in a table
  16.  * there is one table per DTD
  17.  */
  18.  
  19. #define XML_MIN_NOTATION_TABLE    32
  20.  
  21. typedef struct xmlNotationTable {
  22.     int nb_notations;        /* number of notations stored */
  23.     int max_notations;        /* maximum number of notations */
  24.     xmlNotationPtr table;    /* the table of attributes */
  25. } xmlNotationTable;
  26. typedef xmlNotationTable *xmlNotationTablePtr;
  27.  
  28. /*
  29.  * ALl element declarations are stored in a table
  30.  * there is one table per DTD
  31.  */
  32.  
  33. #define XML_MIN_ELEMENT_TABLE    32
  34.  
  35. typedef struct xmlElementTable {
  36.     int nb_elements;        /* number of elements stored */
  37.     int max_elements;        /* maximum number of elements */
  38.     xmlElementPtr table;    /* the table of elements */
  39. } xmlElementTable;
  40. typedef xmlElementTable *xmlElementTablePtr;
  41.  
  42. /*
  43.  * ALl attribute declarations are stored in a table
  44.  * there is one table per DTD
  45.  */
  46.  
  47. #define XML_MIN_ATTRIBUTE_TABLE    32
  48.  
  49. typedef struct xmlAttributeTable {
  50.     int nb_attributes;        /* number of attributes stored */
  51.     int max_attributes;        /* maximum number of attributes */
  52.     xmlAttributePtr table;    /* the table of attributes */
  53. } xmlAttributeTable;
  54. typedef xmlAttributeTable *xmlAttributeTablePtr;
  55.  
  56. /* Notation */
  57. xmlNotationPtr xmlAddNotationDecl(xmlDtdPtr dtd, const CHAR *name,
  58.            const CHAR *PublicID, const CHAR *SystemID);
  59. xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table);
  60. void xmlFreeNotationTable(xmlNotationTablePtr table);
  61. void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table);
  62.  
  63. /* Element Content */
  64. xmlElementContentPtr xmlNewElementContent(CHAR *name, int type);
  65. xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
  66. void xmlFreeElementContent(xmlElementContentPtr cur);
  67.  
  68. /* Element */
  69. xmlElementPtr xmlAddElementDecl(xmlDtdPtr dtd, const CHAR *name, int type, 
  70.                                        xmlElementContentPtr content);
  71. xmlElementTablePtr xmlCopyElementTable(xmlElementTablePtr table);
  72. void xmlFreeElementTable(xmlElementTablePtr table);
  73. void xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table);
  74.  
  75. /* Enumeration */
  76. xmlEnumerationPtr xmlCreateEnumeration(CHAR *name);
  77. void xmlFreeEnumeration(xmlEnumerationPtr cur);
  78. xmlEnumerationPtr xmlCopyEnumeration(xmlEnumerationPtr cur);
  79.  
  80. /* Attribute */
  81. xmlAttributePtr xmlAddAttributeDecl(xmlDtdPtr dtd, const CHAR *elem,
  82.            const CHAR *name, int type, int def,
  83.            const CHAR *defaultValue, xmlEnumerationPtr tree);
  84. xmlAttributeTablePtr xmlCopyAttributeTable(xmlAttributeTablePtr table);
  85. void xmlFreeAttributeTable(xmlAttributeTablePtr table);
  86. void xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table);
  87.  
  88. #endif /* __XML_VALID_H__ */
  89.